package com.wct.springcloud;

import com.netflix.loadbalancer.RetryRule;
import com.wct.ribbonrule.MySelfRule;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.ribbon.RibbonClient;

/**
 * 在启动该微服务的时候就能去加载我们自定义的Ribbon配置类，从而使配置生效
 */
@RibbonClient(name = "MICROSERVICECLOUD-DEPT-PROVIDER", configuration = {RetryRule.class})
@EnableEurekaClient
@SpringBootApplication
public class DeptConsumer9001 {
    public static void main(String[] args) {
        SpringApplication.run(DeptConsumer9001.class, args);
    }
}
